# -*- encoding:utf-8 -*-
from mako import runtime, filters, cache
UNDEFINED = runtime.UNDEFINED
__M_dict_builtin = dict
__M_locals_builtin = locals
_magic_number = 5
_modified_time = 1317648594.947659
_template_filename=u'/home/kenshuri/c_chrysalide/trunk/portal/portal/templates/menu.mako'
_template_uri=u'/menu.mako'
_template_cache=cache.Cache(__name__, _modified_time)
_source_encoding='utf-8'
from webhelpers.html import escape
_exports = []


def render_body(context,**pageargs):
    context.caller_stack._push_frame()
    try:
        __M_locals = __M_dict_builtin(pageargs=pageargs)
        name = context.get('name', UNDEFINED)
        title = context.get('title', UNDEFINED)
        i = context.get('i', UNDEFINED)
        len = context.get('len', UNDEFINED)
        x = context.get('x', UNDEFINED)
        id = context.get('id', UNDEFINED)
        __M_writer = context.writer()
        # SOURCE LINE 1

        from portal.lib.menu import spectacles, evenements
                
        def print_spectacles(spectacles = None):
                if spectacles is not None:      
                        i = 0
                        x = ''
                        for id, title in spectacles.iteritems():        
                                i = i+1
                                x = x + "<li "                  
                                if i == len(spectacles):
                                        x = x + ' style="border:none;" ' 
                                x = x + ">"
                                x = x + '<a href="/spectacles/view/%s">%s</a></li>' % (id, title)
                        return x
         
        def print_evenements(evenements = None):
                if evenements is not None:      
                        i = 0
                        x = ''
                        for id, name in evenements.iteritems(): 
                                i = i+1
                                x = x + "<li "                  
                                if i == len(evenements):
                                        x = x + ' style="border:none;" ' 
                                x = x + ">"
                                x = x + '<a href="/evenement/view/%s">%s</a></li>' % (id, name)
                        return x
                
        
        
        __M_locals_builtin_stored = __M_locals_builtin()
        __M_locals.update(__M_dict_builtin([(__M_key, __M_locals_builtin_stored[__M_key]) for __M_key in ['print_spectacles','spectacles','print_evenements','evenements'] if __M_key in __M_locals_builtin_stored]))
        # SOURCE LINE 30
        __M_writer(u'\n<div id="menu">\n\t<ul>\n\t\t<li><a href="/">Accueil</a></li>\n\t\t\t\n\t\t<li><a href="/compagnie">Compagnie</a>\n\t\t\t<ul>\n\t\t\t\t<li><a href="/compagnie/presentation">Pr\xe9sentation</a></li>\n\t\t\t\t<li><a href="/compagnie/equipe">Equipe</a></li>\n\t\t\t\t<li style="border:none;"><a href="/compagnie/programmation">Programmation</a></li>\n\t\t\t</ul>\n\t\t</li>\n\t\t<li><a href="/spectacles">Spectacles</a>\n\t\t\t<ul>\n\t\t\t\t')
        # SOURCE LINE 44
        __M_writer(print_spectacles(spectacles = spectacles()) )
        __M_writer(u'\n\t\t\t</ul>\n\t\t</li>\n\t\t<li><a href="/evenement">Ev\xe8nements</a>\n\t\t\t<ul>\n\t\t\t\t')
        # SOURCE LINE 49
        __M_writer(print_evenements(evenements = evenements()) )
        __M_writer(u'\n\t\t\t</ul>\n\t\t</li>\n\t\t<li><a href="/ecole/ecole">Ecole</a>\n\t\t\t<ul>\n\t\t\t\t<li><a href="/ecole/professeur">Professeurs</a></li>\n\t\t\t\t<li><a href="/ecole/cours">Cours</a></li>\n\t\t\t\t<li style="border:none;"><a href="/ecole/palmares">Palmar\xe8s</a></li>\n\t\t\t</ul>\n\t\t</li>\n\t\t<!--<li><a href="/presse">Presse</a>\n\t\t\t<ul>\n\t\t\t\t<li><a href="/presse/compagnie">Compagnie</a></li>\n\t\t\t\t<li><a href="/presse/spectacles">Spectacles</a></li>\n\t\t\t\t<li  style="border:none;"><a href="/presse/ecole">Ecole</a></li>\n\t\t\t</ul>\n\t\t</li>-->\n\t\t<!--<li><a href="/forum">Forum</a></li>-->\n\t\t<!--<li><a href="/goldenbook">Livre d\'or</a></li>-->\n\t\t<li style="border:none;"><a href="/contact">Contacts</a></li>\n\t</ul>\t\n</div>')
        return ''
    finally:
        context.caller_stack._pop_frame()


